<?php
/*
####Database####
Interval Events => 	public_events-table; 
					(A_I,  VARC,RAND,  boolean)
					[INDEX|NAME|FACTOR|CHECKED]
-----------------------------------------------
####CORE(PRIVATE SERVER ONLY)#### <--Event_Scheduler = ON; !!
1. Check how many events are in the list and 
	do a for-loop
2. Check if the event is already at work
3. If not, work on it with a switch and do the
	subwork
4. Delete the current work
------------------- CODE ----------------------
$con = Connect();
$Event_N = mysql_num_row(mysql_query("SELECT INDEX FROM public_events"));
for($i = 0; $i < $Event_N; ++$i)
{
	$result = mysql_fetch_assoc(mysql_query("SELECT * FROM public_events WHERE INDEX LIKE $i"));
	if($result['checked'] != 1)
	{
		switch($result['NAME'])
		{
			default: 	//Do something
						mysql_query("DELETE FROM public_events WHERE INDEX LIKE $i");
						break;
		}
	}
}
Close($con);
*/
date_default_timezone_set('Europe/Berlin');
function EventHandler($event)
{
	$online=true;
	$logout = false;
	do
	{
		switch($event)
		{
			case 'Haendler': 	require_once('EventHandler.php');
								break;
			default: 			break;
		}
	}while($online != false);
}
?>